var num = 0;
var allPoints = 0;

function delCookie(name){//为了删除指定名称的cookie，可以将其过期时间设定为一个过去的时间
var date = new Date();
date.setTime(date.getTime() - 10000);
document.cookie = name + "=a; expires=" + date.toGMTString()+";path=/";
}

function setCookie(c_name,value,expiredays)
{
	var exdate=new Date()
	exdate.setDate(exdate.getDate()+expiredays)
	document.cookie=c_name+ "=" +escape(value)+
	((expiredays==null) ? "" : ";expires="+exdate.toGMTString())+";path=/";
}

function getCookie(c_name)
{
if (document.cookie.length>0)
  {
  c_start=document.cookie.indexOf(c_name + "=")
  if (c_start!=-1)
    { 
    c_start=c_start + c_name.length+1 
    c_end=document.cookie.indexOf(";",c_start)
    if (c_end==-1) c_end=document.cookie.length
    return unescape(document.cookie.substring(c_start,c_end))
    } 
  }
return ""
}

function List(){
    this.value = [];
         /*添加*/
    this.add = function(obj){
        return this.value.push(obj);
    };
    
    this.addAll = function(obj){
    	for(var i in obj){
            this.value.push(i);
        }
        return 
    };
     
    /*大小*/
    this.size = function(){
        return this.value.length;
    };
 
    /*返回指定索引的值*/
    this.get = function(index){
        return this.value[index];
    };
 
    /*删除指定索引的值*/
    this.remove = function(index){
        this.value1 = [];                          
        this.value[index]='';                      
        for(var i=0;i<this.size();i++){
            if(this.value[i]!=''){                 
                this.value1.push(this.value[i]);
            }
        }
        this.value = this.value1;  
        delete this.value1;        
        return this.value;         
    };
     
    /*删除全部值*/
    this.removeAll = function(){
        return this.value=[];          
    };
 
    /*是否包含某个对象*/
    this.constains = function(obj){
        for(var i in this.value){
            if( obj == this.value[i] ){
                return true;
            }else{                     
                continue;
            }
        }
        return false;              
    };
}




